package com.example.myapplication.entity

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName

data class WorkNoticeBean(
    @SerializedName("typecode")
    var typeCode: String = "",
    @SerializedName("typename")
    var typeName: String = "",
    var cont: String = "",
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: ""
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(typeCode)
        parcel.writeString(typeName)
        parcel.writeString(cont)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<WorkNoticeBean> {
        override fun createFromParcel(parcel: Parcel): WorkNoticeBean {
            return WorkNoticeBean(parcel)
        }

        override fun newArray(size: Int): Array<WorkNoticeBean?> {
            return arrayOfNulls(size)
        }
    }
}